"""WSGI application wrapping the search server.

"""

import search
import settings
import time
import traceback
import wsgiwapi

urls = {
    u'search': {
        u'latestapi': search.latestapi,
        u'0': {
            # Searching and getting info
            u'search': search.search,
            u'get': search.get,
            u'parse_latlong': search.parse_latlong,

            # Database administration
            u'listdbs': search.listdbs,
            u'newdb': search.newdb,
            u'deldb': search.deldb,

            # Database modification
            u'add': search.add,
            u'delete': search.delete,
        }
    }
}
Application = wsgiwapi.make_application(urls, autodoc='docs')
